Skip to content

REF: Skip all empty groups in _transform_general #42404

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 6, 2021

Conversation

rhshadrach
Copy link
Member

  • Ensure all linting tests pass, see here for how to run them

@rhshadrach rhshadrach added Refactor Internal refactoring of code Groupby labels Jul 6, 2021
@@ -1309,6 +1309,8 @@ def _transform_general(self, func, *args, **kwargs):
fast_path, slow_path = self._define_paths(func, *args, **kwargs)

for name, group in gen:
if not np.prod(group.shape):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

group.size?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jreback jreback added this to the 1.4 milestone Jul 6, 2021
@jreback jreback merged commit 6e1f697 into pandas-dev:master Jul 6, 2021
@rhshadrach rhshadrach deleted the clean_transform_general branch July 7, 2021 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Groupby Refactor Internal refactoring of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants